package com.ruoyi.cabinets.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 柜体信息对象 cabinets
 *
 * @author ruoyi
 * @date 2025-06-03
 */
public class Cabinets extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 柜体唯一编号 */
    private String cabinetId;

    /** 详细位置描述 */
    @Excel(name = "详细位置描述")
    private String location;

    /** 纬度坐标 */
    @Excel(name = "纬度坐标")
    private BigDecimal latitude;

    /** 经度坐标 */
    @Excel(name = "经度坐标")
    private BigDecimal longitude;

    /** 柜体状态 */
    @Excel(name = "柜体状态")
    private String status;

    /** 柜体内部温度 */
    @Excel(name = "柜体内部温度")
    private Long temperature;

    /** 最后通信时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后通信时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastHeartbeat;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setCabinetId(String cabinetId)
    {
        this.cabinetId = cabinetId;
    }

    public String getCabinetId()
    {
        return cabinetId;
    }

    public void setLocation(String location)
    {
        this.location = location;
    }

    public String getLocation()
    {
        return location;
    }

    public void setLatitude(BigDecimal latitude)
    {
        this.latitude = latitude;
    }

    public BigDecimal getLatitude()
    {
        return latitude;
    }

    public void setLongitude(BigDecimal longitude)
    {
        this.longitude = longitude;
    }

    public BigDecimal getLongitude()
    {
        return longitude;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setTemperature(Long temperature)
    {
        this.temperature = temperature;
    }

    public Long getTemperature()
    {
        return temperature;
    }

    public void setLastHeartbeat(Date lastHeartbeat)
    {
        this.lastHeartbeat = lastHeartbeat;
    }

    public Date getLastHeartbeat()
    {
        return lastHeartbeat;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cabinetId", getCabinetId())
            .append("location", getLocation())
            .append("latitude", getLatitude())
            .append("longitude", getLongitude())
            .append("status", getStatus())
            .append("temperature", getTemperature())
            .append("lastHeartbeat", getLastHeartbeat())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
